package com.program.eneity;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * @program: AirportSystem
 * @description: 与UI层交互对应的航班表实体类
 * @author: 19071027
 * @create: 2021-09-13 20:08
 **/
public class FlightSchedule {

    /**
     * 航空公司
     */
    private StringProperty company;

    /**
     * 航班号
     */
    private StringProperty id;

    /**
     * 起飞时间
     */
    private StringProperty dTime;

    /**
     * 到达时间
     */
    private StringProperty aTime;

    public FlightSchedule(String company, String id, String dTime, String aTime) {
        this.setCompany(company);
        this.setId(id);
        this.setDTime(dTime);
        this.setATime(aTime);
    }

    public String getCompany() {
        return companyProperty().get();
    }

    public void setCompany(String company) {
        this.companyProperty().set(company);
    }

    public StringProperty companyProperty() {
        if (company == null) {
            company = new SimpleStringProperty(this, "航空公司");
        }
        return company;
    }

    public String getId() {
        return idProperty().get();
    }

    public void setId(String id) {
        this.idProperty().set(id);
    }

    public StringProperty idProperty() {
        if (id == null) {
            id = new SimpleStringProperty(this, "航班号");
        }
        return id;
    }

    public String getDTime() {
        return dTimeProperty().get();
    }

    public void setDTime(String dTime) {
        this.dTimeProperty().set(dTime);
    }

    public StringProperty dTimeProperty() {
        if (dTime == null) {
            dTime = new SimpleStringProperty(this, "起飞时间");
        }
        return dTime;
    }

    public String getATime() {
        return aTimeProperty().get();
    }

    public void setATime(String aTime) {
        this.aTimeProperty().set(aTime);
    }

    public StringProperty aTimeProperty() {
        if (aTime == null) {
            aTime = new SimpleStringProperty(this, "到达时间");
        }
        return aTime;
    }


}
